﻿using System.Data;
using System.IO;
using System.Text;

namespace FTI
{
    public interface IDestination
    {
        /// <summary>
        /// Get the name of object that represents a data destination
        /// </summary>
        string Name { get; }
        /// <summary>
        /// Get the destription of the data destination
        /// </summary>
        string Description { get; }
        /// <summary>
        /// Get the file extension used by the destination
        /// </summary>
        string Extension { get; }
        /// <summary>
        /// Get the encoding so the destination is encoded correctly
        /// </summary>
        Encoding Encoding { get; }
        /// <summary>
        /// Get or Set the location of the datasource
        /// </summary>
        string Location { get; set; }
        /// <summary>
        /// Get the flag that determines if the location is local or URI 
        /// </summary>
        bool IsRemoteLocation { get; }
        /// <summary>
        /// Get a reference to a logging interface
        /// </summary>
        IEventLogging Log { get; }
        /// <summary>
        /// Find out if the selected source is supported by this destination
        /// </summary>
        /// <param name="pSource">reference to datasource interface</param>
        /// <returns>returns true if supported false if not</returns>
        bool IsSourceSupported(ISource pSource);
        /// <summary>
        /// Get a generated datasource
        /// </summary>
        /// <param name="pData">filled dataset provided by the datasource</param>
        /// <returns>returns a data stream representing what will be sent to the destination</returns>
        Stream GenerateDestinationOutput(DataSet pData);
    }
}
